//导入express模块
var express = require('express');
//创建服务器
var app = express();
//设置中间件
app.use(function (request, response, next) {
     //定义变量
     request.number = 20;
     response.number =35;
     next();
});
app.use(function (request, response, next) {
     //发送响应信息
     response.send('<h1 style="color:green">' + request.number + ' : ' + response.number + '</h1>');
});
//启动服务器
app.listen(52273, function () {
     console.log('服务器监听地址在 http://127.0.0.1:52273');
});